#!/bin/sh
cameraCount=6 #PARAMETER
videoPath="~/yourVideoPath.avi"
#echo Please enter Camera_Count
#read cameraCount

a=0
while [ $a -lt $cameraCount ]
do
vlc $videoPath :sout=#transcode{vcodec=MJPG,vb=800,scale=1,acodec=none}:http{mux=mpjpeg,dst=:808$a/} :sout-keep &
   a=`expr $a + 1`
done
